{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import pandas as pd\n",
    "import seaborn as sns\n",
    "import matplotlib.pyplot as plt\n",
    "import lightgbm as lgb\n",
    "import xgboost as xgb\n",
    "from sklearn.preprocessing import LabelEncoder,OneHotEncoder\n",
    "from sklearn.feature_extraction.text import CountVectorizer,TfidfVectorizer,HashingVectorizer\n",
    "from sklearn.decomposition import TruncatedSVD,SparsePCA\n",
    "from sklearn.model_selection import KFold,StratifiedKFold\n",
    "from sklearn.linear_model import LogisticRegression\n",
    "from sklearn.metrics import accuracy_score,roc_auc_score,f1_score,recall_score\n",
    "\n",
    "import gc\n",
    "import time\n",
    "import os\n",
    "import sys\n",
    "import warnings\n",
    "warnings.filterwarnings('ignore')\n",
    "\n",
    "pickle_path = \"../pickle\"\n",
    "active = pd.read_pickle(\"{}/user_app_active_flatten.pickle\".format(pickle_path))\n",
    "usage = pd.read_pickle(\"{}/user_app_usage.pickle\".format(pickle_path))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "train = pd.read_csv(\"../data/age_train.csv\",names=['uid','age_group']).sort_values(by=['uid'])\n",
    "test = pd.read_csv(\"../data/age_test.csv\",names=['uid']).sort_values(by=['uid'])\n",
    "all_data = train.append(test)\n",
    "all_data = all_data.sort_values(by=['uid']).reset_index(drop=True)\n",
    "print(all_data.shape)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from tqdm import tqdm"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from collections import Counter\n",
    "\n",
    "def Gini(pr):\n",
    "    cate=Counter(pr)\n",
    "    gini=1\n",
    "    total=len(pr)\n",
    "    for i in cate:\n",
    "        gini=gini-(cate[i]/total)**2\n",
    "    return gini\n",
    "\n",
    "import math\n",
    "# Calc Entropy\n",
    "def entropy(pr):\n",
    "    cate = Counter(pr)\n",
    "    log2 = math.log2\n",
    "    total = len(pr)\n",
    "    ent = 0\n",
    "    for i in cate:\n",
    "        p = float(cate[i] / total)\n",
    "        if p==0:\n",
    "            ent=0\n",
    "            continue\n",
    "        ent = ent - p * (log2(p))\n",
    "    return ent\n",
    "\n",
    "def get_small(x,a,b):\n",
    "    return int((x>a) & (x<b))\n",
    "\n",
    "def get_feature_flatten(df):\n",
    "    \n",
    "    fea = []\n",
    "    # Count Encoder\n",
    "    t1 = time.time()\n",
    "    df['appid_count'] = df.groupby(['appid'])['uid'].transform('count')\n",
    "    fea.append(df[['uid','appid_count']].groupby(['uid'])['appid_count'].agg({'mean','std','min','max','median'}))\n",
    "    fea.append(df[['uid','appid']].groupby(['uid'])['appid'].apply(Gini))\n",
    "    fea.append(df[['uid','appid']].groupby(['uid'])['appid'].apply(entropy))\n",
    "    df['appid_count_0_1e3'] = df['appid_count'].map(lambda x:get_small(x,0,1e3))\n",
    "    df['appid_count_1e3_1e4'] = df['appid_count'].map(lambda x:get_small(x,1e3,1e4))\n",
    "    df['appid_count_1e4_2e5'] = df['appid_count'].map(lambda x:get_small(x,1e4,2e5))\n",
    "    tmp = df.groupby(['uid']).agg({'appid_count_0_1e3' : ['mean','sum','std'],\n",
    "                          'appid_count_1e3_1e4' : ['mean','sum','std'],\n",
    "                          'appid_count_1e4_2e5' : ['mean','sum','std']\n",
    "                          })\n",
    "\n",
    "    tmp.columns = ['_'.join(col).strip() for col in tmp.columns.values]\n",
    "    fea.append(tmp)\n",
    "    print(\"Count Active Finish... :\",time.time()-t1)\n",
    "    \n",
    "    return fea\n",
    "\n",
    "\n",
    "uid0 = all_data[['uid']]\n",
    "fea0 = get_feature_flatten(usage)\n",
    "for i in tqdm(fea0):\n",
    "    uid0 = uid0.merge(i,how='left',on='uid')\n",
    "\n",
    "uid0 = uid0.set_index('uid').add_prefix(\"usage_\").reset_index()\n",
    "\n",
    "uid1 = all_data[['uid']]\n",
    "fea1 = get_feature_flatten(active)\n",
    "\n",
    "for i in tqdm(fea1):\n",
    "    uid1 = uid1.merge(i,how='left',on='uid')\n",
    "uid1 = uid1.set_index('uid').add_prefix(\"active_\").reset_index()\n",
    "\n",
    "uid0.to_pickle(\"../pickle/usage_flatten_stat.pickle\")\n",
    "uid1.to_pickle(\"../pickle/active_flatten_stat.pickle\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>uid</th>\n",
       "      <th>active_max</th>\n",
       "      <th>active_std</th>\n",
       "      <th>active_min</th>\n",
       "      <th>active_median</th>\n",
       "      <th>active_mean</th>\n",
       "      <th>active_appid_x</th>\n",
       "      <th>active_appid_y</th>\n",
       "      <th>active_appid_count_0_1e3_mean</th>\n",
       "      <th>active_appid_count_0_1e3_sum</th>\n",
       "      <th>active_appid_count_0_1e3_std</th>\n",
       "      <th>active_appid_count_1e3_1e4_mean</th>\n",
       "      <th>active_appid_count_1e3_1e4_sum</th>\n",
       "      <th>active_appid_count_1e3_1e4_std</th>\n",
       "      <th>active_appid_count_1e4_2e5_mean</th>\n",
       "      <th>active_appid_count_1e4_2e5_sum</th>\n",
       "      <th>active_appid_count_1e4_2e5_std</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1000006</td>\n",
       "      <td>4882205.0</td>\n",
       "      <td>1.264451e+06</td>\n",
       "      <td>750.0</td>\n",
       "      <td>604620.0</td>\n",
       "      <td>1.154490e+06</td>\n",
       "      <td>0.978723</td>\n",
       "      <td>5.554589</td>\n",
       "      <td>0.042553</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.204030</td>\n",
       "      <td>0.085106</td>\n",
       "      <td>4.0</td>\n",
       "      <td>0.282057</td>\n",
       "      <td>0.191489</td>\n",
       "      <td>9.0</td>\n",
       "      <td>0.397727</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1000009</td>\n",
       "      <td>4882205.0</td>\n",
       "      <td>1.149125e+06</td>\n",
       "      <td>2430.0</td>\n",
       "      <td>349023.0</td>\n",
       "      <td>8.769154e+05</td>\n",
       "      <td>0.986301</td>\n",
       "      <td>6.189825</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.068493</td>\n",
       "      <td>5.0</td>\n",
       "      <td>0.254338</td>\n",
       "      <td>0.342466</td>\n",
       "      <td>25.0</td>\n",
       "      <td>0.477818</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>1000010</td>\n",
       "      <td>4882205.0</td>\n",
       "      <td>1.106938e+06</td>\n",
       "      <td>1029.0</td>\n",
       "      <td>202722.5</td>\n",
       "      <td>7.977411e+05</td>\n",
       "      <td>0.989583</td>\n",
       "      <td>6.584963</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.125000</td>\n",
       "      <td>12.0</td>\n",
       "      <td>0.332455</td>\n",
       "      <td>0.364583</td>\n",
       "      <td>35.0</td>\n",
       "      <td>0.483840</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>1000011</td>\n",
       "      <td>4882205.0</td>\n",
       "      <td>1.499393e+06</td>\n",
       "      <td>2123.0</td>\n",
       "      <td>164864.0</td>\n",
       "      <td>1.017023e+06</td>\n",
       "      <td>0.952381</td>\n",
       "      <td>4.392317</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.142857</td>\n",
       "      <td>3.0</td>\n",
       "      <td>0.358569</td>\n",
       "      <td>0.380952</td>\n",
       "      <td>8.0</td>\n",
       "      <td>0.497613</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>1000012</td>\n",
       "      <td>4882205.0</td>\n",
       "      <td>1.249960e+06</td>\n",
       "      <td>2750.0</td>\n",
       "      <td>432174.0</td>\n",
       "      <td>9.964622e+05</td>\n",
       "      <td>0.969697</td>\n",
       "      <td>5.044394</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.030303</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.174078</td>\n",
       "      <td>0.303030</td>\n",
       "      <td>10.0</td>\n",
       "      <td>0.466694</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>1000014</td>\n",
       "      <td>4882205.0</td>\n",
       "      <td>1.554756e+06</td>\n",
       "      <td>5835.0</td>\n",
       "      <td>1407021.0</td>\n",
       "      <td>1.651767e+06</td>\n",
       "      <td>0.960000</td>\n",
       "      <td>4.643856</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.040000</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.200000</td>\n",
       "      <td>0.280000</td>\n",
       "      <td>7.0</td>\n",
       "      <td>0.458258</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>1000020</td>\n",
       "      <td>4882205.0</td>\n",
       "      <td>1.598320e+06</td>\n",
       "      <td>10275.0</td>\n",
       "      <td>863964.0</td>\n",
       "      <td>1.675255e+06</td>\n",
       "      <td>0.941176</td>\n",
       "      <td>4.087463</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.117647</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.332106</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>1000027</td>\n",
       "      <td>4882205.0</td>\n",
       "      <td>1.517398e+06</td>\n",
       "      <td>23032.0</td>\n",
       "      <td>1131031.0</td>\n",
       "      <td>1.537524e+06</td>\n",
       "      <td>0.950000</td>\n",
       "      <td>4.321928</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.250000</td>\n",
       "      <td>5.0</td>\n",
       "      <td>0.444262</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>1000033</td>\n",
       "      <td>4882205.0</td>\n",
       "      <td>1.272768e+06</td>\n",
       "      <td>10264.0</td>\n",
       "      <td>1022596.0</td>\n",
       "      <td>1.416801e+06</td>\n",
       "      <td>0.976190</td>\n",
       "      <td>5.392317</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.166667</td>\n",
       "      <td>7.0</td>\n",
       "      <td>0.377195</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>1000034</td>\n",
       "      <td>4882205.0</td>\n",
       "      <td>1.356017e+06</td>\n",
       "      <td>1458.0</td>\n",
       "      <td>652594.0</td>\n",
       "      <td>1.183765e+06</td>\n",
       "      <td>0.974359</td>\n",
       "      <td>5.285402</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.128205</td>\n",
       "      <td>5.0</td>\n",
       "      <td>0.338688</td>\n",
       "      <td>0.179487</td>\n",
       "      <td>7.0</td>\n",
       "      <td>0.388776</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>1000038</td>\n",
       "      <td>4882205.0</td>\n",
       "      <td>1.371406e+06</td>\n",
       "      <td>1388.0</td>\n",
       "      <td>672899.0</td>\n",
       "      <td>1.218746e+06</td>\n",
       "      <td>0.974359</td>\n",
       "      <td>5.285402</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.102564</td>\n",
       "      <td>4.0</td>\n",
       "      <td>0.307355</td>\n",
       "      <td>0.205128</td>\n",
       "      <td>8.0</td>\n",
       "      <td>0.409074</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>1000044</td>\n",
       "      <td>4882205.0</td>\n",
       "      <td>1.430807e+06</td>\n",
       "      <td>1709.0</td>\n",
       "      <td>1172708.0</td>\n",
       "      <td>1.574443e+06</td>\n",
       "      <td>0.968750</td>\n",
       "      <td>5.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.062500</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.245935</td>\n",
       "      <td>0.125000</td>\n",
       "      <td>4.0</td>\n",
       "      <td>0.336011</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>1000049</td>\n",
       "      <td>4882205.0</td>\n",
       "      <td>1.316832e+06</td>\n",
       "      <td>5036.0</td>\n",
       "      <td>766938.0</td>\n",
       "      <td>1.216095e+06</td>\n",
       "      <td>0.978723</td>\n",
       "      <td>5.554589</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.063830</td>\n",
       "      <td>3.0</td>\n",
       "      <td>0.247092</td>\n",
       "      <td>0.234043</td>\n",
       "      <td>11.0</td>\n",
       "      <td>0.427976</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>1000050</td>\n",
       "      <td>4882205.0</td>\n",
       "      <td>1.387972e+06</td>\n",
       "      <td>1275.0</td>\n",
       "      <td>1518521.0</td>\n",
       "      <td>1.585855e+06</td>\n",
       "      <td>0.966667</td>\n",
       "      <td>4.906891</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.066667</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.253708</td>\n",
       "      <td>0.200000</td>\n",
       "      <td>6.0</td>\n",
       "      <td>0.406838</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>1000052</td>\n",
       "      <td>4882205.0</td>\n",
       "      <td>1.310555e+06</td>\n",
       "      <td>742.0</td>\n",
       "      <td>689974.0</td>\n",
       "      <td>1.185557e+06</td>\n",
       "      <td>0.979167</td>\n",
       "      <td>5.584963</td>\n",
       "      <td>0.020833</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.144338</td>\n",
       "      <td>0.062500</td>\n",
       "      <td>3.0</td>\n",
       "      <td>0.244623</td>\n",
       "      <td>0.270833</td>\n",
       "      <td>13.0</td>\n",
       "      <td>0.449093</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>1000054</td>\n",
       "      <td>4882205.0</td>\n",
       "      <td>1.407268e+06</td>\n",
       "      <td>1668.0</td>\n",
       "      <td>23129.0</td>\n",
       "      <td>7.597682e+05</td>\n",
       "      <td>0.916667</td>\n",
       "      <td>3.584963</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.416667</td>\n",
       "      <td>5.0</td>\n",
       "      <td>0.514929</td>\n",
       "      <td>0.166667</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.389249</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>1000055</td>\n",
       "      <td>4882205.0</td>\n",
       "      <td>1.444737e+06</td>\n",
       "      <td>1781.0</td>\n",
       "      <td>822987.0</td>\n",
       "      <td>1.395352e+06</td>\n",
       "      <td>0.969697</td>\n",
       "      <td>5.044394</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.090909</td>\n",
       "      <td>3.0</td>\n",
       "      <td>0.291937</td>\n",
       "      <td>0.212121</td>\n",
       "      <td>7.0</td>\n",
       "      <td>0.415149</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>1000057</td>\n",
       "      <td>4882205.0</td>\n",
       "      <td>1.411182e+06</td>\n",
       "      <td>4249.0</td>\n",
       "      <td>1052084.0</td>\n",
       "      <td>1.316088e+06</td>\n",
       "      <td>0.969697</td>\n",
       "      <td>5.044394</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.060606</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.242306</td>\n",
       "      <td>0.272727</td>\n",
       "      <td>9.0</td>\n",
       "      <td>0.452267</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>1000060</td>\n",
       "      <td>4882205.0</td>\n",
       "      <td>1.400649e+06</td>\n",
       "      <td>2770.0</td>\n",
       "      <td>1558150.0</td>\n",
       "      <td>1.755509e+06</td>\n",
       "      <td>0.962963</td>\n",
       "      <td>4.754888</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.074074</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.266880</td>\n",
       "      <td>0.148148</td>\n",
       "      <td>4.0</td>\n",
       "      <td>0.362014</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>1000063</td>\n",
       "      <td>4882205.0</td>\n",
       "      <td>2.092357e+06</td>\n",
       "      <td>27143.0</td>\n",
       "      <td>897833.5</td>\n",
       "      <td>1.866966e+06</td>\n",
       "      <td>0.833333</td>\n",
       "      <td>2.584963</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.166667</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.408248</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>1000065</td>\n",
       "      <td>4882205.0</td>\n",
       "      <td>1.325450e+06</td>\n",
       "      <td>5254.0</td>\n",
       "      <td>690126.0</td>\n",
       "      <td>1.175964e+06</td>\n",
       "      <td>0.972222</td>\n",
       "      <td>5.169925</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.111111</td>\n",
       "      <td>4.0</td>\n",
       "      <td>0.318728</td>\n",
       "      <td>0.250000</td>\n",
       "      <td>9.0</td>\n",
       "      <td>0.439155</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>1000068</td>\n",
       "      <td>4882205.0</td>\n",
       "      <td>1.782682e+06</td>\n",
       "      <td>6741.0</td>\n",
       "      <td>1257880.0</td>\n",
       "      <td>1.629322e+06</td>\n",
       "      <td>0.875000</td>\n",
       "      <td>3.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.125000</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.353553</td>\n",
       "      <td>0.125000</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.353553</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>1000070</td>\n",
       "      <td>4882205.0</td>\n",
       "      <td>1.462859e+06</td>\n",
       "      <td>213134.0</td>\n",
       "      <td>2608998.0</td>\n",
       "      <td>2.341407e+06</td>\n",
       "      <td>0.909091</td>\n",
       "      <td>3.459432</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>1000071</td>\n",
       "      <td>4882205.0</td>\n",
       "      <td>1.569892e+06</td>\n",
       "      <td>14339.0</td>\n",
       "      <td>2490530.0</td>\n",
       "      <td>2.085865e+06</td>\n",
       "      <td>0.916667</td>\n",
       "      <td>3.584963</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.166667</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.389249</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>1000073</td>\n",
       "      <td>4882205.0</td>\n",
       "      <td>1.455460e+06</td>\n",
       "      <td>409.0</td>\n",
       "      <td>131090.0</td>\n",
       "      <td>9.438971e+05</td>\n",
       "      <td>0.941176</td>\n",
       "      <td>4.087463</td>\n",
       "      <td>0.058824</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.242536</td>\n",
       "      <td>0.117647</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.332106</td>\n",
       "      <td>0.352941</td>\n",
       "      <td>6.0</td>\n",
       "      <td>0.492592</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>1000076</td>\n",
       "      <td>4882205.0</td>\n",
       "      <td>1.485827e+06</td>\n",
       "      <td>92181.0</td>\n",
       "      <td>873438.0</td>\n",
       "      <td>1.350422e+06</td>\n",
       "      <td>0.933333</td>\n",
       "      <td>3.906891</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.200000</td>\n",
       "      <td>3.0</td>\n",
       "      <td>0.414039</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>1000077</td>\n",
       "      <td>4882205.0</td>\n",
       "      <td>1.620743e+06</td>\n",
       "      <td>15267.0</td>\n",
       "      <td>1523226.0</td>\n",
       "      <td>1.714650e+06</td>\n",
       "      <td>0.888889</td>\n",
       "      <td>3.169925</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.111111</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.333333</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>1000082</td>\n",
       "      <td>4882205.0</td>\n",
       "      <td>1.258583e+06</td>\n",
       "      <td>991.0</td>\n",
       "      <td>681919.0</td>\n",
       "      <td>1.146017e+06</td>\n",
       "      <td>0.981818</td>\n",
       "      <td>5.781360</td>\n",
       "      <td>0.018182</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.134840</td>\n",
       "      <td>0.072727</td>\n",
       "      <td>4.0</td>\n",
       "      <td>0.262082</td>\n",
       "      <td>0.200000</td>\n",
       "      <td>11.0</td>\n",
       "      <td>0.403687</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28</th>\n",
       "      <td>1000087</td>\n",
       "      <td>4882205.0</td>\n",
       "      <td>1.604503e+06</td>\n",
       "      <td>40479.0</td>\n",
       "      <td>1883374.0</td>\n",
       "      <td>1.854392e+06</td>\n",
       "      <td>0.944444</td>\n",
       "      <td>4.169925</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.111111</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.323381</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29</th>\n",
       "      <td>1000092</td>\n",
       "      <td>4882205.0</td>\n",
       "      <td>1.354499e+06</td>\n",
       "      <td>930.0</td>\n",
       "      <td>1126340.5</td>\n",
       "      <td>1.325247e+06</td>\n",
       "      <td>0.972222</td>\n",
       "      <td>5.169925</td>\n",
       "      <td>0.027778</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.166667</td>\n",
       "      <td>0.083333</td>\n",
       "      <td>3.0</td>\n",
       "      <td>0.280306</td>\n",
       "      <td>0.222222</td>\n",
       "      <td>8.0</td>\n",
       "      <td>0.421637</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4999970</th>\n",
       "      <td>44545558</td>\n",
       "      <td>4882205.0</td>\n",
       "      <td>1.473342e+06</td>\n",
       "      <td>1725.0</td>\n",
       "      <td>1327361.5</td>\n",
       "      <td>1.569269e+06</td>\n",
       "      <td>0.944444</td>\n",
       "      <td>4.169925</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.111111</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.323381</td>\n",
       "      <td>0.166667</td>\n",
       "      <td>3.0</td>\n",
       "      <td>0.383482</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4999971</th>\n",
       "      <td>44545722</td>\n",
       "      <td>4882205.0</td>\n",
       "      <td>1.327107e+06</td>\n",
       "      <td>386734.0</td>\n",
       "      <td>1666855.0</td>\n",
       "      <td>2.015906e+06</td>\n",
       "      <td>0.928571</td>\n",
       "      <td>3.807355</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4999972</th>\n",
       "      <td>44545745</td>\n",
       "      <td>4882205.0</td>\n",
       "      <td>1.583729e+06</td>\n",
       "      <td>9823.0</td>\n",
       "      <td>647464.5</td>\n",
       "      <td>1.457205e+06</td>\n",
       "      <td>0.954545</td>\n",
       "      <td>4.459432</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.045455</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.213201</td>\n",
       "      <td>0.227273</td>\n",
       "      <td>5.0</td>\n",
       "      <td>0.428932</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4999973</th>\n",
       "      <td>44545898</td>\n",
       "      <td>4882205.0</td>\n",
       "      <td>1.629402e+06</td>\n",
       "      <td>13970.0</td>\n",
       "      <td>746639.5</td>\n",
       "      <td>1.382737e+06</td>\n",
       "      <td>0.928571</td>\n",
       "      <td>3.807355</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.285714</td>\n",
       "      <td>4.0</td>\n",
       "      <td>0.468807</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4999974</th>\n",
       "      <td>44546026</td>\n",
       "      <td>4882205.0</td>\n",
       "      <td>1.597020e+06</td>\n",
       "      <td>7180.0</td>\n",
       "      <td>39990.0</td>\n",
       "      <td>7.620160e+05</td>\n",
       "      <td>0.888889</td>\n",
       "      <td>3.169925</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.222222</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.440959</td>\n",
       "      <td>0.444444</td>\n",
       "      <td>4.0</td>\n",
       "      <td>0.527046</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4999975</th>\n",
       "      <td>44546068</td>\n",
       "      <td>4882205.0</td>\n",
       "      <td>1.040692e+06</td>\n",
       "      <td>370.0</td>\n",
       "      <td>200035.5</td>\n",
       "      <td>6.985488e+05</td>\n",
       "      <td>0.988636</td>\n",
       "      <td>6.459432</td>\n",
       "      <td>0.034091</td>\n",
       "      <td>3.0</td>\n",
       "      <td>0.182503</td>\n",
       "      <td>0.102273</td>\n",
       "      <td>9.0</td>\n",
       "      <td>0.304743</td>\n",
       "      <td>0.363636</td>\n",
       "      <td>32.0</td>\n",
       "      <td>0.483802</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4999976</th>\n",
       "      <td>44546071</td>\n",
       "      <td>4882205.0</td>\n",
       "      <td>1.104689e+06</td>\n",
       "      <td>855.0</td>\n",
       "      <td>188717.5</td>\n",
       "      <td>6.963114e+05</td>\n",
       "      <td>0.986486</td>\n",
       "      <td>6.209453</td>\n",
       "      <td>0.013514</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.116248</td>\n",
       "      <td>0.135135</td>\n",
       "      <td>10.0</td>\n",
       "      <td>0.344201</td>\n",
       "      <td>0.378378</td>\n",
       "      <td>28.0</td>\n",
       "      <td>0.488293</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4999977</th>\n",
       "      <td>44546219</td>\n",
       "      <td>4882205.0</td>\n",
       "      <td>1.066563e+06</td>\n",
       "      <td>1074.0</td>\n",
       "      <td>136333.0</td>\n",
       "      <td>6.552106e+05</td>\n",
       "      <td>0.987952</td>\n",
       "      <td>6.375039</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.108434</td>\n",
       "      <td>9.0</td>\n",
       "      <td>0.312818</td>\n",
       "      <td>0.457831</td>\n",
       "      <td>38.0</td>\n",
       "      <td>0.501247</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4999978</th>\n",
       "      <td>44546458</td>\n",
       "      <td>4882205.0</td>\n",
       "      <td>1.384284e+06</td>\n",
       "      <td>2430.0</td>\n",
       "      <td>1905119.0</td>\n",
       "      <td>1.953635e+06</td>\n",
       "      <td>0.933333</td>\n",
       "      <td>3.906891</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.133333</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.351866</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4999979</th>\n",
       "      <td>44547147</td>\n",
       "      <td>4882205.0</td>\n",
       "      <td>1.353039e+06</td>\n",
       "      <td>50680.0</td>\n",
       "      <td>2147850.0</td>\n",
       "      <td>2.154984e+06</td>\n",
       "      <td>0.937500</td>\n",
       "      <td>4.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.062500</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.250000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4999980</th>\n",
       "      <td>44547347</td>\n",
       "      <td>4882205.0</td>\n",
       "      <td>1.292936e+06</td>\n",
       "      <td>320.0</td>\n",
       "      <td>604620.0</td>\n",
       "      <td>1.180358e+06</td>\n",
       "      <td>0.975610</td>\n",
       "      <td>5.357552</td>\n",
       "      <td>0.073171</td>\n",
       "      <td>3.0</td>\n",
       "      <td>0.263652</td>\n",
       "      <td>0.073171</td>\n",
       "      <td>3.0</td>\n",
       "      <td>0.263652</td>\n",
       "      <td>0.195122</td>\n",
       "      <td>8.0</td>\n",
       "      <td>0.401218</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4999981</th>\n",
       "      <td>44547514</td>\n",
       "      <td>4882205.0</td>\n",
       "      <td>1.558740e+06</td>\n",
       "      <td>1742.0</td>\n",
       "      <td>652594.0</td>\n",
       "      <td>1.399318e+06</td>\n",
       "      <td>0.933333</td>\n",
       "      <td>3.906891</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.066667</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.258199</td>\n",
       "      <td>0.200000</td>\n",
       "      <td>3.0</td>\n",
       "      <td>0.414039</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4999982</th>\n",
       "      <td>44547709</td>\n",
       "      <td>4882205.0</td>\n",
       "      <td>1.579949e+06</td>\n",
       "      <td>3035.0</td>\n",
       "      <td>401781.0</td>\n",
       "      <td>1.411939e+06</td>\n",
       "      <td>0.947368</td>\n",
       "      <td>4.247928</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.105263</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.315302</td>\n",
       "      <td>0.263158</td>\n",
       "      <td>5.0</td>\n",
       "      <td>0.452414</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4999983</th>\n",
       "      <td>44547767</td>\n",
       "      <td>4882205.0</td>\n",
       "      <td>1.260601e+06</td>\n",
       "      <td>2593.0</td>\n",
       "      <td>928741.0</td>\n",
       "      <td>1.423103e+06</td>\n",
       "      <td>0.962963</td>\n",
       "      <td>4.754888</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.037037</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.192450</td>\n",
       "      <td>0.111111</td>\n",
       "      <td>3.0</td>\n",
       "      <td>0.320256</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4999984</th>\n",
       "      <td>44547890</td>\n",
       "      <td>4882205.0</td>\n",
       "      <td>1.258761e+06</td>\n",
       "      <td>8712.0</td>\n",
       "      <td>1968498.0</td>\n",
       "      <td>2.050100e+06</td>\n",
       "      <td>0.916667</td>\n",
       "      <td>3.584963</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.083333</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.288675</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4999985</th>\n",
       "      <td>44547903</td>\n",
       "      <td>4882205.0</td>\n",
       "      <td>1.515015e+06</td>\n",
       "      <td>4055.0</td>\n",
       "      <td>981604.0</td>\n",
       "      <td>1.495237e+06</td>\n",
       "      <td>0.958333</td>\n",
       "      <td>4.584963</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.125000</td>\n",
       "      <td>3.0</td>\n",
       "      <td>0.337832</td>\n",
       "      <td>0.125000</td>\n",
       "      <td>3.0</td>\n",
       "      <td>0.337832</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4999986</th>\n",
       "      <td>44548258</td>\n",
       "      <td>4882205.0</td>\n",
       "      <td>1.572956e+06</td>\n",
       "      <td>340160.0</td>\n",
       "      <td>2315240.0</td>\n",
       "      <td>2.243322e+06</td>\n",
       "      <td>0.923077</td>\n",
       "      <td>3.700440</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4999987</th>\n",
       "      <td>44548522</td>\n",
       "      <td>4882205.0</td>\n",
       "      <td>1.203228e+06</td>\n",
       "      <td>5629.0</td>\n",
       "      <td>604620.0</td>\n",
       "      <td>1.001447e+06</td>\n",
       "      <td>0.965517</td>\n",
       "      <td>4.857981</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.034483</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.185695</td>\n",
       "      <td>0.344828</td>\n",
       "      <td>10.0</td>\n",
       "      <td>0.483725</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4999988</th>\n",
       "      <td>44548602</td>\n",
       "      <td>4882205.0</td>\n",
       "      <td>1.450843e+06</td>\n",
       "      <td>5134.0</td>\n",
       "      <td>637683.0</td>\n",
       "      <td>1.278071e+06</td>\n",
       "      <td>0.956522</td>\n",
       "      <td>4.523562</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.086957</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.288104</td>\n",
       "      <td>0.260870</td>\n",
       "      <td>6.0</td>\n",
       "      <td>0.448978</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4999989</th>\n",
       "      <td>44549394</td>\n",
       "      <td>4882205.0</td>\n",
       "      <td>1.435901e+06</td>\n",
       "      <td>32159.0</td>\n",
       "      <td>1629295.0</td>\n",
       "      <td>1.894551e+06</td>\n",
       "      <td>0.947368</td>\n",
       "      <td>4.247928</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.105263</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.315302</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4999990</th>\n",
       "      <td>44549419</td>\n",
       "      <td>4882205.0</td>\n",
       "      <td>1.331779e+06</td>\n",
       "      <td>2485.0</td>\n",
       "      <td>2110179.5</td>\n",
       "      <td>2.098948e+06</td>\n",
       "      <td>0.950000</td>\n",
       "      <td>4.321928</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.050000</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.223607</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4999991</th>\n",
       "      <td>44549588</td>\n",
       "      <td>4882205.0</td>\n",
       "      <td>1.283680e+06</td>\n",
       "      <td>10585.0</td>\n",
       "      <td>358429.0</td>\n",
       "      <td>9.882043e+05</td>\n",
       "      <td>0.979592</td>\n",
       "      <td>5.614710</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.408163</td>\n",
       "      <td>20.0</td>\n",
       "      <td>0.496587</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4999992</th>\n",
       "      <td>44549766</td>\n",
       "      <td>4882205.0</td>\n",
       "      <td>2.308054e+06</td>\n",
       "      <td>2886.0</td>\n",
       "      <td>602678.5</td>\n",
       "      <td>1.522612e+06</td>\n",
       "      <td>0.750000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.250000</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.500000</td>\n",
       "      <td>0.250000</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.500000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4999993</th>\n",
       "      <td>44549879</td>\n",
       "      <td>4882205.0</td>\n",
       "      <td>1.342144e+06</td>\n",
       "      <td>3664.0</td>\n",
       "      <td>559415.0</td>\n",
       "      <td>1.298541e+06</td>\n",
       "      <td>0.976190</td>\n",
       "      <td>5.392317</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.047619</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.215540</td>\n",
       "      <td>0.238095</td>\n",
       "      <td>10.0</td>\n",
       "      <td>0.431081</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4999994</th>\n",
       "      <td>44549925</td>\n",
       "      <td>4882205.0</td>\n",
       "      <td>1.521702e+06</td>\n",
       "      <td>1250.0</td>\n",
       "      <td>1191047.0</td>\n",
       "      <td>1.457389e+06</td>\n",
       "      <td>0.952381</td>\n",
       "      <td>4.392317</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.142857</td>\n",
       "      <td>3.0</td>\n",
       "      <td>0.358569</td>\n",
       "      <td>0.238095</td>\n",
       "      <td>5.0</td>\n",
       "      <td>0.436436</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4999995</th>\n",
       "      <td>44549935</td>\n",
       "      <td>4882205.0</td>\n",
       "      <td>1.292133e+06</td>\n",
       "      <td>110300.0</td>\n",
       "      <td>1476899.0</td>\n",
       "      <td>1.638636e+06</td>\n",
       "      <td>0.966667</td>\n",
       "      <td>4.906891</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.066667</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0.253708</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4999996</th>\n",
       "      <td>44550047</td>\n",
       "      <td>4882205.0</td>\n",
       "      <td>1.536794e+06</td>\n",
       "      <td>14386.0</td>\n",
       "      <td>1439982.0</td>\n",
       "      <td>1.640484e+06</td>\n",
       "      <td>0.952381</td>\n",
       "      <td>4.392317</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.285714</td>\n",
       "      <td>6.0</td>\n",
       "      <td>0.462910</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4999997</th>\n",
       "      <td>44550060</td>\n",
       "      <td>4882205.0</td>\n",
       "      <td>1.915361e+06</td>\n",
       "      <td>623911.0</td>\n",
       "      <td>2034573.5</td>\n",
       "      <td>2.393816e+06</td>\n",
       "      <td>0.750000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4999998</th>\n",
       "      <td>44550777</td>\n",
       "      <td>4882205.0</td>\n",
       "      <td>1.701870e+06</td>\n",
       "      <td>18206.0</td>\n",
       "      <td>1410171.0</td>\n",
       "      <td>1.729424e+06</td>\n",
       "      <td>0.833333</td>\n",
       "      <td>2.584963</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.166667</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.408248</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4999999</th>\n",
       "      <td>44550890</td>\n",
       "      <td>4882205.0</td>\n",
       "      <td>1.383309e+06</td>\n",
       "      <td>951.0</td>\n",
       "      <td>908018.0</td>\n",
       "      <td>1.349027e+06</td>\n",
       "      <td>0.970588</td>\n",
       "      <td>5.087463</td>\n",
       "      <td>0.029412</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.171499</td>\n",
       "      <td>0.029412</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.171499</td>\n",
       "      <td>0.205882</td>\n",
       "      <td>7.0</td>\n",
       "      <td>0.410426</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>5000000 rows × 17 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "              uid  active_max    active_std  active_min  active_median  \\\n",
       "0         1000006   4882205.0  1.264451e+06       750.0       604620.0   \n",
       "1         1000009   4882205.0  1.149125e+06      2430.0       349023.0   \n",
       "2         1000010   4882205.0  1.106938e+06      1029.0       202722.5   \n",
       "3         1000011   4882205.0  1.499393e+06      2123.0       164864.0   \n",
       "4         1000012   4882205.0  1.249960e+06      2750.0       432174.0   \n",
       "...           ...         ...           ...         ...            ...   \n",
       "4999995  44549935   4882205.0  1.292133e+06    110300.0      1476899.0   \n",
       "4999996  44550047   4882205.0  1.536794e+06     14386.0      1439982.0   \n",
       "4999997  44550060   4882205.0  1.915361e+06    623911.0      2034573.5   \n",
       "4999998  44550777   4882205.0  1.701870e+06     18206.0      1410171.0   \n",
       "4999999  44550890   4882205.0  1.383309e+06       951.0       908018.0   \n",
       "\n",
       "          active_mean  active_appid_x  active_appid_y  \\\n",
       "0        1.154490e+06        0.978723        5.554589   \n",
       "1        8.769154e+05        0.986301        6.189825   \n",
       "2        7.977411e+05        0.989583        6.584963   \n",
       "3        1.017023e+06        0.952381        4.392317   \n",
       "4        9.964622e+05        0.969697        5.044394   \n",
       "...               ...             ...             ...   \n",
       "4999995  1.638636e+06        0.966667        4.906891   \n",
       "4999996  1.640484e+06        0.952381        4.392317   \n",
       "4999997  2.393816e+06        0.750000        2.000000   \n",
       "4999998  1.729424e+06        0.833333        2.584963   \n",
       "4999999  1.349027e+06        0.970588        5.087463   \n",
       "\n",
       "         active_appid_count_0_1e3_mean  active_appid_count_0_1e3_sum  \\\n",
       "0                             0.042553                           2.0   \n",
       "1                             0.000000                           0.0   \n",
       "2                             0.000000                           0.0   \n",
       "3                             0.000000                           0.0   \n",
       "4                             0.000000                           0.0   \n",
       "...                                ...                           ...   \n",
       "4999995                       0.000000                           0.0   \n",
       "4999996                       0.000000                           0.0   \n",
       "4999997                       0.000000                           0.0   \n",
       "4999998                       0.000000                           0.0   \n",
       "4999999                       0.029412                           1.0   \n",
       "\n",
       "         active_appid_count_0_1e3_std  active_appid_count_1e3_1e4_mean  \\\n",
       "0                            0.204030                         0.085106   \n",
       "1                            0.000000                         0.068493   \n",
       "2                            0.000000                         0.125000   \n",
       "3                            0.000000                         0.142857   \n",
       "4                            0.000000                         0.030303   \n",
       "...                               ...                              ...   \n",
       "4999995                      0.000000                         0.000000   \n",
       "4999996                      0.000000                         0.000000   \n",
       "4999997                      0.000000                         0.000000   \n",
       "4999998                      0.000000                         0.000000   \n",
       "4999999                      0.171499                         0.029412   \n",
       "\n",
       "         active_appid_count_1e3_1e4_sum  active_appid_count_1e3_1e4_std  \\\n",
       "0                                   4.0                        0.282057   \n",
       "1                                   5.0                        0.254338   \n",
       "2                                  12.0                        0.332455   \n",
       "3                                   3.0                        0.358569   \n",
       "4                                   1.0                        0.174078   \n",
       "...                                 ...                             ...   \n",
       "4999995                             0.0                        0.000000   \n",
       "4999996                             0.0                        0.000000   \n",
       "4999997                             0.0                        0.000000   \n",
       "4999998                             0.0                        0.000000   \n",
       "4999999                             1.0                        0.171499   \n",
       "\n",
       "         active_appid_count_1e4_2e5_mean  active_appid_count_1e4_2e5_sum  \\\n",
       "0                               0.191489                             9.0   \n",
       "1                               0.342466                            25.0   \n",
       "2                               0.364583                            35.0   \n",
       "3                               0.380952                             8.0   \n",
       "4                               0.303030                            10.0   \n",
       "...                                  ...                             ...   \n",
       "4999995                         0.066667                             2.0   \n",
       "4999996                         0.285714                             6.0   \n",
       "4999997                         0.000000                             0.0   \n",
       "4999998                         0.166667                             1.0   \n",
       "4999999                         0.205882                             7.0   \n",
       "\n",
       "         active_appid_count_1e4_2e5_std  \n",
       "0                              0.397727  \n",
       "1                              0.477818  \n",
       "2                              0.483840  \n",
       "3                              0.497613  \n",
       "4                              0.466694  \n",
       "...                                 ...  \n",
       "4999995                        0.253708  \n",
       "4999996                        0.462910  \n",
       "4999997                        0.000000  \n",
       "4999998                        0.408248  \n",
       "4999999                        0.410426  \n",
       "\n",
       "[5000000 rows x 17 columns]"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "uid1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
